//
// Created by Administrator on 2023/5/23.
//
#pragma once
#include "../header/Create_Table.h"


Create_Table::Create_Table(): LDF_Dialog()
    , ok_button(new QPushButton()), go_back_button(new QPushButton())
    , rows(new QLabel()), columns(new QLabel())
    , rows_edit(new QLineEdit()), columns_edit(new QLineEdit())
    {
        this->Control_Profile(this->ok_button, QString("OK_Button"), Create_Table_Qss::ok_b_q, 140, 210, 100, 30, "OK");
        this->Control_Profile(this->go_back_button, QString("Go_Back_Button"), Create_Table_Qss::go_b_q, 260, 210, 100, 30, "Go_Back");
        this->Control_Profile(this->rows, QString("Rows_Label"), Create_Table_Qss::rows_l_q, 140, 80, 80, 30, "Rows");
        this->Control_Profile(this->columns, QString("Columns_Label"), Create_Table_Qss::columns_l_q, 140, 150, 80, 30, "Columns");
        this->Control_Profile(this->rows_edit, QString("Rows_Edit"), Create_Table_Qss::rows_e_q, 220, 80, 100, 30, "");
        this->Control_Profile(this->columns_edit, QString("Columns_Edit"), Create_Table_Qss::columns_e_q, 220, 150, 100, 30, "");
    }


Create_Table::Create_Table(New_Table *new_table): LDF_Dialog()
    , new_table(new_table), ok_button(new QPushButton()), go_back_button(new QPushButton())
    , rows(new QLabel()), columns(new QLabel())
    , rows_edit(new QLineEdit()), columns_edit(new QLineEdit())
    {
        this->Control_Profile(this->ok_button, QString("OK_Button"), Create_Table_Qss::ok_b_q, 140, 210, 100, 30, "OK");
        this->Control_Profile(this->go_back_button, QString("Go_Back_Button"), Create_Table_Qss::go_b_q, 260, 210, 100, 30, "Go_Back");
        this->Control_Profile(this->rows, QString("Rows_Label"), Create_Table_Qss::rows_l_q, 140, 80, 80, 30, "Rows");
        this->Control_Profile(this->columns, QString("Columns_Label"), Create_Table_Qss::columns_l_q, 140, 150, 80, 30, "Columns");
        this->Control_Profile(this->rows_edit, QString("Rows_Edit"), Create_Table_Qss::rows_e_q, 220, 80, 100, 30, "");
        this->Control_Profile(this->columns_edit, QString("Columns_Edit"), Create_Table_Qss::columns_e_q, 220, 150, 100, 30, "");
    }



Create_Table::~Create_Table()
{
    delete ok_button, go_back_button, rows, columns, rows_edit, columns_edit;
}


QPushButton* Create_Table::Get_O_B()
{
    return this->ok_button;
}


QPushButton* Create_Table::Get_G_B()
{
    return this->go_back_button;
}


QLineEdit* Create_Table::Get_R_E()
{
    return this->rows_edit;
}


QLineEdit* Create_Table::Get_C_E()
{
    return this->columns_edit;
}


void Create_Table::Set_Table_Object(New_Table *temp_table)
{
    this->new_table = temp_table;
}




